package at.codebase.db.entities;


/**
 * @author Lukas Pfeifhofer <lukas.pfeifhofer@devlabs.pro>
 */

public class EUser {


	private Long userId;

	private String username;
	private long imageId;
	

	private boolean isAdmin;				//Global admin flag
	

	private String googleUserId;			//Reference to the connected Google Account and Key
	private EGoogleUserData googleUserData;	//Data provided by the Google User service
	private long timeCreate;				//The time of the create datetime
	private boolean isActive;				//True if the account is active
	private String deleteKey;
	private String locale;
	
	private String description;
	
	/*
	 * Embed classes
	 */

	public static class EGoogleUserData {
		String authDomain;
		String email;
		String federatedIdentity;
		String nickname;
		public String getAuthDomain() {
			return authDomain;
		}
		public String getEmail() {
			return email;
		}
		public String getFederatedIdentity() {
			return federatedIdentity;
		}
		public String getNickname() {
			return nickname;
		}
	}
	
	/*
	 * Constructors
	 */
	public EUser() {	}
	
	
	public Long getId() {
		return userId;
	}
	
	public void setId(Long userId) {
		this.userId = userId;
	}

	public String getGoogleUserId() {
		return googleUserId;
	}

	public void setGoogleUserId(String googleUserId) {
		this.googleUserId = googleUserId;
	}

	public EGoogleUserData getGoogleUserData() {
		return googleUserData;
	}

	public void setGoogleUserData(EGoogleUserData googleUserData) {
		this.googleUserData = googleUserData;
	}

	public long getTimeCreate() {
		return timeCreate;
	}

	public void setTimeCreate(long timeCreate) {
		this.timeCreate = timeCreate;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}

	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}
	
	public boolean isAdmin() {
		return isAdmin;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getLocale() {
		return locale;
	}

	public void setLocale(String userLocale) {
		this.locale = userLocale;
	}

	public String getDescription() {
		if(description==null)
			return "";
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setImage(long imageId) {
		this.imageId = imageId;
	}
	
	public long getImage(){
		return imageId;
	}

	public void setDeleteKey(String key) {
		this.deleteKey = key;
	}

	public String getDeleteKey() {
		return deleteKey;
	}
	
}
